<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:icecore="http://www.icefaces.org/icefaces/core"
      xmlns:ace="http://www.icefaces.org/icefaces/components"
      xmlns:ice="http://www.icesoft.com/icefaces/component">

    <ui:composition template="/template.xhtml">

        <ui:define name="title">Administración :: Login</ui:define>

        <ui:define name="content">
            <c:if test="#{mbLoginAdmin.userID > 0}">
                <script type="text/javascript">
                    window.location = "./faces/admin/usuario/accedido.xhtml";
                </script>
            </c:if>
            <c:if test="#{mbLoginAdmin.userID == 0}">
                <ice:form  partialSubmit="false">
                    <ice:panelGrid  columns="2">
                        <ice:outputLabel  value="Nombre de Usuario:" for="j_username"></ice:outputLabel>
                        <ice:inputText  id="j_username"
                                        value="#{mbLoginAdmin.username}" size="40"
                                        maxlength="80"/>
                        <ice:outputLabel  value="Contraseña:" for="j_password"></ice:outputLabel>
                        <ice:inputSecret styleClass="css_InputSecret" id="j_password"
                                         value="#{mbLoginAdmin.password}" size="40"
                                         maxlength="80"  action="#{mbLoginAdmin.mbAcceder}"/>
                    </ice:panelGrid>
                    <ice:commandButton  action="#{mbLoginAdmin.mbAcceder}" value="Login" />
                    <br />
                    <ice:outputLabel  value="#{mbLoginAdmin.warning}" style="color: red;"/>
                </ice:form>
            </c:if>
        </ui:define>
    </ui:composition>
</html>
